import request from '@/utils/request'



// 获取角色列表
export const getRoleList = params => request.get('/admin/role',{params})


// 删除角色 可批量删除
export const deleteRole = data => request.delete(`/admin/role/`,{data})

// 设置默认角色
export const setDefaultRole = id => request.patch(`/admin/role/setDefaultRole/${id}`)

// 添加角色
export const addRole = data => request.post(`/admin/role/`,data)

// 修改
export const editRole = (id,data) => request.put(`/admin/role/${id}`,data)

// 根据id获取角色
export const getRoleId = id => request.get(`/admin/role/${id}`)

